package com.kly.user.db.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.google.common.collect.Maps;
import com.kly.user.db.dao.UserGreetingCommonContentDao;
import com.kly.user.db.entity.UserGreetingCommonContentEntity;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
* User: linqu
* Date: 2023-09-06
* Time: 23:45:28.615
*/

@Repository
public class UserGreetingCommonContentDaoImpl extends AbstractBaseMapper<UserGreetingCommonContentEntity> implements UserGreetingCommonContentDao {

    @Override
    public List<String> getGreetingContent(String greetingCode,int limitNum, String appCode) {
        Map<String, Object> params = Maps.newHashMap();
        params.put("greetingCode", greetingCode);
        params.put("limitNum", limitNum);
        params.put("appCode", appCode);
        return this.getSqlSession().selectList(this.getStatement("getGreetingContent"), params);
    }

    @Override
    public List<UserGreetingCommonContentEntity> listGreetingContents() {
        return this.getSqlSession().selectList(this.getStatement("listGreetingContents"));
    }
}